package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.EntranceType;

import java.util.Date;

/**
 * Author：fuchunyu
 * Date：2017/10/20
 * Description：
 */
public class BaseEntrance {
    private Integer id;
    private String appUrl;
    private String name;
    private String shortName;
    private String img;
    private String url;
    private Integer state;
    private Integer createUserId;
    private Date createTime;
    private EntranceType type;

    public EntranceType getType() {
        return type;
    }

    public void setType(EntranceType type) {
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAppUrl() {
        return appUrl;
    }

    public void setAppUrl(String appUrl) {
        this.appUrl = appUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public Integer getTypeValue(){
        return (type != null) ? type.getIntValue() : null;
    }

    public void setTypeValue(Integer v){
        if(v != null)
            type = EntranceType.getByIntValue(v);
    }
}
